package com.sskj.hangqing.presenter;

import com.sskj.common.base.HttpData;
import com.sskj.hangqing.ui.activity.MarketActivity;
import com.sskj.lib.bean.CoinBean;
import com.sskj.lib.http.CallBackOption;

import java.util.List;


public class MarketActivityPresenter extends BasePresenter<MarketActivity> {

    public void getData(String code) {
        httpService.getProduct(code)
                .execute(new CallBackOption<HttpData<List<CoinBean>>>() {
                }.unLoadBind(mView)
                .execute(httpData-> mView.refreshCoin(httpData.getData().get(0))));
    }
}
